package com.csgc.camera.base

import android.os.Bundle
import android.view.View
import androidx.viewbinding.ViewBinding


abstract class LazyV2Fragment<T : ViewBinding>: BaseFragment<T>() {

    //是否第一次加载
    private var isFirstLoad = true

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
    }

    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
        super.onViewCreated(view, savedInstanceState)
        initView()
    }
    override fun onResume() {
        super.onResume()
        if(isFirstLoad){
            initEvent()
            initData()
            isFirstLoad = false
        }
    }


    protected open fun initView(){}

    protected open fun initData(){

    }
    protected open fun initEvent(){

    }



}